<?php
$rs_order = Orders::findAll();
?>
<div><img src="img/banner/banner1.jpg" width="436" height="248" /></div>
<div class="clearAll"></div>
<ul>
    <?php foreach ($rs_order as $_rs_order) { ?>
        <li>
            <p class="normal-font">
                Khách hỏi 1 vé máy bay <?php echo $_rs_order["chuyen_bay_di"] !== "0" && $_rs_order["chuyen_bay_ve"] !== "0" ? "Khứ Hồi" : "Một chiều"; ?>  
                <?php
                $lich_bay = Air_Port::findByLichBayId($_rs_order["chuyen_bay_di"]);
                foreach ($lich_bay as $_lich_bay) {
                    $chuyen_bay_go = Air_Port::findAirportCodeId($_lich_bay["airport_code_go"]);
                    foreach ($chuyen_bay_go as $_chuyen_bay_go) {
                        $c_go = $_chuyen_bay_go["title"];
                    }
                    $chuyen_bay_to = Air_Port::findAirportByCodeId($_lich_bay["airport_code_to"]);
                    foreach ($chuyen_bay_to as $_chuyen_bay_to) {
                        $c_to = $_chuyen_bay_to["title"];
                    }
                    ?>
                    <b style="font-weight: bold;"><?php echo $c_go ?> - <?php echo $c_to ?></b>, ngày 
                    <span style="font-weight: bold;"><?php echo date("d/m", $_lich_bay["ngay_di"]); ?></span></p>

                <span style="width: 55px;height: 35px;float: left;padding-right: 10px"><img src="img/airline/smBL.gif" class="logo-airplane"></span>
                <span class="time-before">1 phút trước</span>
                <div class="price2">
                    <span class="bold-font">Giá </span><span class="bold-font-orange14"><?php echo number_format($_lich_bay["gia_ve_nguoi_lon"]+$_lich_bay["phi_nguoi_lon"]) ?> vnđ/1 vé</span>
                </div>
            <?php } ?>
                <a href="<?php echo $domain . "/#!/url=search.php?router=" . base64_encode($_lich_bay["airport_code_go"]) ?>" class="viewDetail" target="_blank" rel="nofollow">Chi tiết</a>
            <br class="clear" />
        </li>
    <?php } ?>
</ul>